package com.ruoyi.project.business.punch.mapper;

import com.ruoyi.project.business.punch.entity.ScheduleClockPunch;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 打卡Mapper接口
 * 
 * @author thanks
 * @date 2024-02-05
 */
public interface ScheduleClockPunchMapper {
    /**
     * 查询打卡
     * 
     * @param id 打卡ID
     * @return 打卡
     */
    public ScheduleClockPunch selectScheduleClockPunchById(Long id);

    /**
     * 查询打卡列表
     * 
     * @param scheduleClockPunch 打卡
     * @return 打卡集合
     */
    public List<ScheduleClockPunch> selectScheduleClockPunchList(ScheduleClockPunch scheduleClockPunch);

    /**
     * 新增打卡
     * 
     * @param scheduleClockPunch 打卡
     * @return 结果
     */
    public int insertScheduleClockPunch(ScheduleClockPunch scheduleClockPunch);

    /**
     * 修改打卡
     * 
     * @param scheduleClockPunch 打卡
     * @return 结果
     */
    public int updateScheduleClockPunch(ScheduleClockPunch scheduleClockPunch);

    /**
     * 删除打卡
     * 
     * @param id 打卡ID
     * @return 结果
     */
    public int deleteScheduleClockPunchById(Long id);

    /**
     * 批量删除打卡
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteScheduleClockPunchByIds(Long[] ids);

    List<ScheduleClockPunch> selectPunchListByUserId(
            @Param("year") Integer year,
            @Param("month") Integer month,
            @Param("userIds") List<Long> userId,
            @Param("tenantId") Long tenantId);

    int insertBatch(List<ScheduleClockPunch> list);

    ScheduleClockPunch selectExist(
            @Param("year") Integer year,
            @Param("month") Integer month,
            @Param("dayOfMonth") Integer dayOfMonth,
            @Param("tenantId") Long tenantId);
}
